﻿<local:MyWindow x:Class="MercuryFE.CoverFlow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MercuryFE Coverflow" 
    xmlns:local="clr-namespace:MercuryFE"
    Height="200" Width="200"
    xmlns:fl="clr-namespace:SStuff.FlowControls;assembly=SStuff.FlowControls"
>
    <!--WindowState="Maximized"  WindowStyle="None" Topmost="True"-->
    <!--Height="850" Width="1200"-->

    <Window.Resources>
        <DataTemplate x:Key="itemTemplate">
            <Viewbox>
                <Border Width="400" Height="400" Margin="1" CornerRadius="15">
                    <Image Source="{Binding Path=Image}" />
                </Border>
            </Viewbox>
        </DataTemplate>

        <Style x:Key="LargeTextStyle">
            <Setter Property="Control.FontFamily" Value="Calibri" />
            <Setter Property="Control.FontSize" Value="35" />
            <Setter Property="Control.FontWeight" Value="Bold" />
            <Setter Property="Control.Foreground" Value="White" />
            <Setter Property="Control.Height" Value="100" />
            <Setter Property="Control.HorizontalAlignment" Value="Center" />
            <Setter Property="Control.VerticalAlignment" Value="Center" />
            <Setter Property="Control.Margin" Value="0,0,0,0" />
        </Style>

        <Style x:Key="MediumTextStyle">
            <Setter Property="Control.FontFamily" Value="Calibri" />
            <Setter Property="Control.FontSize" Value="20" />
            <Setter Property="Control.FontWeight" Value="Bold" />
            <Setter Property="Control.Foreground" Value="White" />
            <Setter Property="Control.HorizontalAlignment" Value="Left" />
            <Setter Property="Control.VerticalAlignment" Value="Center" />
            <Setter Property="Control.Margin" Value="0,0,0,0" />
        </Style>

    </Window.Resources>


    <Canvas x:Name="canv">
        <Grid Background="{StaticResource backgroundGradient}"  Canvas.ZIndex="2" Width="{Binding ElementName=canv, Path=ActualWidth}" Height="{Binding ElementName=canv, Path=ActualHeight}">
            <Grid.RowDefinitions>
                <RowDefinition Height="1*"></RowDefinition>
                <RowDefinition Height="3*"></RowDefinition>
                <RowDefinition Height="1*"></RowDefinition>
                <RowDefinition Height="1*"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>

            <Viewbox Grid.Row="0" Grid.ColumnSpan="3">
                <TextBlock  Name="tbPathCrumb" Style="{StaticResource LargeTextStyle}" Text="" />
            </Viewbox>

            <fl:FlowItemsControl3D x:Name="flow"
              
               MaxHeight="{Binding Path=ActualHeight, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Grid}}}"
                               MaxWidth="{Binding Path=ActualWidth, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Grid}}}"
                            
              ItemTemplate="{StaticResource itemTemplate}" Grid.Row="1" Grid.ColumnSpan="3"
                                 Margin="1"  />


            <Viewbox Grid.Row="2" Grid.ColumnSpan="3">
                <TextBlock  Name="tbTitle"  Style="{StaticResource LargeTextStyle}" Text="Loading..." />
            </Viewbox>

            <Viewbox Grid.Row="3" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center">
                <!--Played stats-->
                <!--<Border x:Name="bPlayStats" Background="{StaticResource MyGlassBrushResource}" CornerRadius="20" Padding="5" Visibility="Hidden">-->
                <StackPanel x:Name="bPlayStats" Orientation="Vertical" VerticalAlignment="Center">
                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                        <Label Content="Last Played: " Style="{StaticResource MediumTextStyle}" />
                        <TextBlock x:Name="tbLastPlayed" Style="{StaticResource MediumTextStyle}" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                        <Label Content="Total Played: " Style="{StaticResource MediumTextStyle}" />
                        <TextBlock x:Name="tbTotalPlayed" Style="{StaticResource MediumTextStyle}" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                        <Label Content="Number of times Played: " Style="{StaticResource MediumTextStyle}" />
                        <TextBlock x:Name="tbNumberPlayed" Style="{StaticResource MediumTextStyle}" />
                    </StackPanel>
                </StackPanel>
                <!--</Border>-->
            </Viewbox>


            <!--number of players (mame)-->

            <Grid x:Name="gNumPlayers" Grid.Row="3" Grid.Column="2" Visibility="Hidden" HorizontalAlignment="Center" VerticalAlignment="Center">
                <Grid.RowDefinitions>
                    <RowDefinition Height="1*" />
                    <RowDefinition Height="1*" />
                    <RowDefinition Height="1*" />
                </Grid.RowDefinitions>
                <Viewbox Grid.Row="0">
                    <!--<Border Background="{StaticResource MyGlassBrushResource}" CornerRadius="20" Padding="5">-->
                    <StackPanel Orientation="Vertical" x:Name="spEmulatorImage" VerticalAlignment="Center" />
                </Viewbox>
                <Viewbox Grid.Row="1">
                    <StackPanel Orientation="Vertical" x:Name="spNPlayers" VerticalAlignment="Center"  />
                </Viewbox>
                <!--</Border>-->
            </Grid>





        </Grid>
        <Viewbox Canvas.ZIndex="1" MaxWidth="{Binding ElementName=canv, Path=ActualWidth}" MaxHeight="{Binding ElementName=canv, Path=ActualHeight}">
            <!--Location to load game snapshot in background-->
            <!--<Image x:Name="BackgroundImage" Source="C:\Documents and Settings\horvathm\My Documents\My Pictures\mame\abstract-blue-background-A-bright dayz....jpg"  />-->
        </Viewbox>

        <Viewbox x:Name="vbMessage" Canvas.ZIndex="99"  MaxWidth="{Binding ElementName=canv, Path=ActualWidth}" MaxHeight="{Binding ElementName=canv, Path=ActualHeight}">
            <TextBlock x:Name="message" Foreground="Black" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Hidden" Background="LightGray" Opacity="0.95" Margin="10" />
        </Viewbox>
    </Canvas>
</local:MyWindow>
